/*      Copyright 2002 Arizona Board of regents on behalf of 
 *                  The University of Arizona 
 *                     All Rights Reserved 
 *         (USE & RESTRICTION - Please read COPYRIGHT file) 
 * 
 *  Version    : DEVSJAVA 2.7 
 *  Date       : 08-15-02 
 */ 


package GenDevsTest;

import java.awt.*;
import java.util.*;
import GenCol.*;
import genDevs.modeling.*;
import genDevs.simulation.*;
import simView.*;

public class RegisterNet extends ViewableDigraph
{
    double interval = 900; // 90days *10 hrs
    int actualNum = 300;
    double actualMean = interval / actualNum;
    // (e.g. a registration every 3 hours)
    long seed = 40;
    public RegisterNet()
    {
        super("registerNet");
        addInport("in");
        addOutport("out");
        //registerGenr rg = new registerGenr("rg",seed,actualNum,interval);
        RegSeqGenr rg = new RegSeqGenr("rg", seed, actualNum, interval);
        add(rg);
        addCoupling(this, "start", rg, "start");
        RegisterNeuron rn100 = new RegisterNeuron("rn100", 100, interval);
        add(rn100);
        addCoupling(rg, "out", rn100, "in");
        addCoupling(rn100, "out", this, "out");
        RegisterNeuron rn200 = new RegisterNeuron("rn200", 200, interval);
        add(rn200);
        addCoupling(rg, "out", rn200, "in");
        addCoupling(rn200, "out", this, "out");
        RegisterNeuron rn300 = new RegisterNeuron("rn300", 300, interval);
        add(rn300);
        addCoupling(rg, "out", rn300, "in");
        addCoupling(rn300, "out", this, "out");
        RegisterPredict rp = new RegisterPredict("rp", interval);
        add(rp);
        addCoupling(rn100, "out", rp, "in");
        addCoupling(rn200, "out", rp, "in");
        addCoupling(rn300, "out", rp, "in");
        addCoupling(this, "start", rg, "start");

        preferredSize = new Dimension(757, 298);
        rg.setPreferredLocation(new Point(10, 21));
        rn100.setPreferredLocation(new Point(322, 29));
        rn200.setPreferredLocation(new Point(322, 117));
        rn300.setPreferredLocation(new Point(322, 204));
        rp.setPreferredLocation(new Point(507, 235));
    }
    /**
     * Automatically generated by the SimView program.
     * Do not edit this manually, as such changes will get overwritten.
     */
    public void layoutForSimView()
    {
        preferredSize = new Dimension(757, 301);
        ((ViewableComponent)withName("rn100")).setPreferredLocation(new Point(322, 29));
        ((ViewableComponent)withName("rn300")).setPreferredLocation(new Point(322, 204));
        ((ViewableComponent)withName("rp")).setPreferredLocation(new Point(507, 235));
        ((ViewableComponent)withName("rn200")).setPreferredLocation(new Point(322, 117));
        ((ViewableComponent)withName("rg")).setPreferredLocation(new Point(10, 21));
    }
}
